<?php
/* @var $this GroupController */
/* @var $model Group */

$this->breadcrumbs=array(
	'Groups'=>array('index'),
	'Manage',
);

$this->menu=array(
	array('label'=>'List Group', 'url'=>array('index')),
	array('label'=>'Create Group', 'url'=>array('create')),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#group-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>


<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'group-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		'id',
		'name',
        array(
            'name'=>'time',
            'type'=>'datetime',
            'filter'=>false,
        ),
		'count',
		array(
			'class'=>'CButtonColumn',
		),
	),
)); ?>
<style type="text/css">
    div.buttons{
        background-image: url("/easyui/images/linkbutton_bg.png");
        background-position: right 0;
        background-repeat: no-repeat;
        border-radius: 5px 5px 5px 5px;
        color: #444444;
        cursor: pointer;
        display: inline-block;
        float: right;
        font-size: 12px;
        height: 24px;
        outline: medium none;
        padding-right: 18px;
        text-decoration: none;
        float: left;
    }
    a[type="button"]{
        background: url("/easyui/images/button_span_bg.gif") no-repeat scroll left top transparent;
        display: inline-block;
        height: 16px;
        line-height: 18px;
        padding: 4px 0 4px 18px;
        border: 0;
    }
</style>
<link rel="stylesheet" type="text/css" href="/ui/themes/default/easyui.css" />
<div class="row buttons" style="float:right;margin: 20px;">
    <a type="button" href="/index.php/group/create">创建群组</a>
</div>
